
package me.zhengjie.domain;

import lombok.Data;
import cn.hutool.core.bean.BeanUtil;
import io.swagger.annotations.ApiModelProperty;
import cn.hutool.core.bean.copier.CopyOptions;
import javax.persistence.*;
import javax.validation.constraints.*;
import java.sql.Timestamp;
import java.io.Serializable;

/**
* @website https://el-admin.vip
* @description /
* @author IQW
* @date 2022-07-18
**/
@Entity
@Data
@Table(name="app_work_cover")
public class AppWorkCover implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    @ApiModelProperty(value = "分类ID")
    private Integer id;

    @Column(name = "title")
    @ApiModelProperty(value = "名称")
    private String title;

    @Column(name = "codeno")
    @ApiModelProperty(value = "编码")
    private String codeno;

    @Column(name = "img")
    @ApiModelProperty(value = "亮色图标")
    private String img;

    @Column(name = "img2")
    @ApiModelProperty(value = "灰色图标")
    private String img2;

    @Column(name = "img3")
    @ApiModelProperty(value = "小图标")
    private String img3;

    @Column(name = "gps")
    @ApiModelProperty(value = "包含gps点位")
    private String gps;

    @Column(name = "ordid")
    @ApiModelProperty(value = "排序（越小越前）")
    private Integer ordid;

    @Column(name = "status")
    @ApiModelProperty(value = "状态")
    private Integer status;

    @Column(name = "create_time")
    @ApiModelProperty(value = "创建日期")
    private Timestamp createTime;

    @Column(name = "update_time")
    @ApiModelProperty(value = "更新日期")
    private Timestamp updateTime;

    public void copy(AppWorkCover source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}